#pragma once

class Label;
class Font;

class StatisticsHud:
	public ICriticalSection
{
public:
	StatisticsHud();
	~StatisticsHud();

	/*-IHud---------------------------------------------------------------------*/
	void OnHudUpdate();
	void OnHudRender();

	/*-ICriticalSection---------------------------------------------------------*/
	enum CriticalSection
	{
	    Statistics = 0,
	    Labels
	};

	/*--------------------------------------------------------------------------*/

	void SetLabel(const std::string& name, const std::string& val);

#ifdef VL_RENDER_STATISTICS
	void IncrementStatistic(const char* statistics, unsigned int value = 1);
	void DecrementStatistic(const char* statistics);
#endif

private:
	void DrawAllLabels();

	std::map<const std::string, std::string> m_labels;
	std::map<const char*, int> m_statistics;

	Variable* var_label_enabled;

#ifdef VL_RENDER_STATISTICS
	Variable* var_statistics_enabled;
#endif

	Font* res_default_small;
};